protocol Person {
    var name: String { get set }
    var age: Int { get }
}
struct Student: Person {
    var name: String
    var age: Int

    // 自定义构造器
    // init(name: String, age: Int) {
    //     self.name = name
    //     self.age = age
    // }
}
var p1: Person = Student(name: "Alice", age: 20)
p1.name = "Bob"  // 错误：name是只读属性
